﻿<html>
<head>
<title>用户登录</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
<link href="../css/usercss.css" rel="stylesheet" type="text/css">
<link href="../template/default/css/common.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="../js/jquery.js"></script>

<script language="javascript" type="text/javascript">
function checkpass(password)
{
    	if(password.length==0)
		{
			document.getElementById("ckpass").innerHTML = '<img src=../images/cuo.gif alt="错误" align=absmiddle /> <font color=#ff0000>请输入密码</font>';
		}
		else
		{
			document.getElementById("ckpass").innerHTML = '';
		}
}  
function checkusername(username)
{
    	if(username.length==0)
		{
			document.getElementById("ckusername").innerHTML = '<img src=../images/cuo.gif alt="错误" align=absmiddle /> <font color=#ff0000>请输入用户名</font>';
		}
		else
		{
			document.getElementById("ckusername").innerHTML = '';
		}
}
function checkall()
{
	if(document.getElementById("username").value==""||document.getElementById("password").value=="")
	{
		return false;
	}
	else
	{
		return true;
	}
}  
</script>

</head>
<body style="margin-left:20px">

<div style="margin-top:20px; margin-bottom:20px; margin-left:20px;"><img src="../template/default/images/logo.gif" /></div>
<form action="checklogin.php" method="post" name="form1" id="form1" onSubmit="return checkall()"><table width="334" border="0" cellpadding="0" cellspacing="0">
                    <tr>
                      <td width="62" height="40" align="right" style="font-size:13px">&nbsp;&nbsp;用户名 *</td>
                      <td width="136" height="40"><input name="username" type="text" class="ddinput" onBlur="checkusername(document.getElementById('username').value);" value="<? echo $_COOKIE["ddusername"] ?>" size="20" id="username" maxlength="20" style="width:120px;" />                      </td>
                      <td width="118" height="40" id="ckusername" style="font-size:13px">请输入用户名</td>
                    </tr>
                    <tr>
                      <td height="40" align="right" style="font-size:13px">密&nbsp;&nbsp;&nbsp;&nbsp;码 * </td>
                      <td height="40"><input name="password" type="password" class="ddinput" id="password" onBlur="checkpass(document.getElementById('password').value);" value="" size="20" maxlength="20" style="width:120px;" />                      </td>
                      <td height="40" id="ckpass" style="font-size:13px">请输入密码</td>
                    </tr>
                    <tr>
                      <td height="40">&nbsp;</td>
                      <td height="40" colspan="2"><input type="submit" name="Submit" value=" 登 录 " class="ddbutton" />
                      &nbsp;&nbsp;<a href="../user/register.php" target="_blank" class="redlink">注册新用户</a> &nbsp;&nbsp;<a href="../user/getpassword.php" target="_blank" class="redlink">找回密码</a></td>
                    </tr>
                  </table>
                  <input type="hidden" name="from" value="" />
                  </form>


</body>
</html>